# -*- coding: utf8 -*-


import wiringpi as gpio

in1 = 11
in2 = 12
in3 = 13
in4 = 15


gpio.wiringPiSetupPhys()

gpio.pinMode(in1, gpio.OUTPUT)
gpio.pinMode(in2, gpio.OUTPUT)
gpio.pinMode(in3, gpio.OUTPUT)
gpio.pinMode(in4, gpio.OUTPUT)


steps = [
  [0, 1, 1, 1],
  [1, 0, 1, 1],
  [1, 1, 0, 1],
  [1, 1, 1, 0]
]

while True:
  for step in steps:
    gpio.digitalWrite(in1, step[0])
    gpio.digitalWrite(in2, step[1])
    gpio.digitalWrite(in3, step[2])
    gpio.digitalWrite(in4, step[3])
    gpio.delay(200)

#while True:
#  for i in range(0, 101, 10):
#    gpio.softPwmWrite(in1, i)
#    gpio.delay(100)
#  for i in range(100, -1, 10):
#    gpio.softPwmWrite(in1, i)
#    gpio.delay(100)


